package com.zztl.infiniteBand.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.zztl.infiniteBand.R
import com.zztl.infiniteBand.model.TradingRecordBean
import com.zztl.infiniteBand.util.DataFormatUtil
import com.zztl.infiniteBand.util.DateUtils
import com.zztl.infiniteBand.util.UiUtils
import java.util.*

/**
 * @desc
 * @auth ${user}
 * @time 2018/6/13  20:02
 */
class RecordAdapter(layoutResId: Int, data: List<TradingRecordBean.DataBean.RowsBean>?) : BaseQuickAdapter<TradingRecordBean.DataBean.RowsBean, BaseViewHolder>(layoutResId, data) {

    override fun convert(helper: BaseViewHolder, item: TradingRecordBean.DataBean.RowsBean) {
        helper.setText(R.id.tv_theme, DataFormatUtil.converTxtPoint4(item.transactionMoney))
        helper.setText(R.id.tv_integer, UiUtils.getString(R.string.活动奖励))
        val createTime = item.confirmTime
        val secoondTime = DateUtils.formatTime(Date(createTime))
        helper.setText(R.id.tv_mileage, secoondTime)
    }


}
